import pandas as pd

from o_930955_hongLiDiBo100 import O930955, calc

if __name__ == '__main__':
    _2025_3thr = O930955()
    _2024_3thr = O930955()
    _2023_3thr = O930955()
    _2022_3thr = O930955()
    _2021_3thr = O930955()

    # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    _2025_3thr.three_year_ago = '20220801'
    _2024_3thr.three_year_ago = '20210801'
    _2023_3thr.three_year_ago = '20200801'
    _2022_3thr.three_year_ago = '20190801'
    _2021_3thr.three_year_ago = '20180801'

    _2025_3thr.one_year_ago = '20240801'
    _2024_3thr.one_year_ago = '20230801'
    _2023_3thr.one_year_ago = '20220801'
    _2022_3thr.one_year_ago = '20210801'
    _2021_3thr.one_year_ago = '20200801'

    _2025_3thr.zero_year_ago = '20250731'
    _2024_3thr.zero_year_ago = '20240731'
    _2023_3thr.zero_year_ago = '20230731'
    _2022_3thr.zero_year_ago = '20220729'
    _2021_3thr.zero_year_ago = '20210730'

    datetime_202403 = (pd.to_datetime('20240801'), pd.to_datetime('20250731'))
    datetime_202303 = (pd.to_datetime('20230801'), pd.to_datetime('20240731'))
    datetime_202203 = (pd.to_datetime('20220801'), pd.to_datetime('20230731'))
    datetime_202103 = (pd.to_datetime('20210801'), pd.to_datetime('20220731'))
    datetime_202003 = (pd.to_datetime('20200801'), pd.to_datetime('20210731'))
    datetime_201903 = (pd.to_datetime('20190801'), pd.to_datetime('20200731'))
    datetime_201803 = (pd.to_datetime('20180801'), pd.to_datetime('20190731'))

    _2025_3thr.intervals = [datetime_202203, datetime_202303, datetime_202403]
    _2024_3thr.intervals = [datetime_202103, datetime_202203, datetime_202303]
    _2023_3thr.intervals = [datetime_202003, datetime_202103, datetime_202203]
    _2022_3thr.intervals = [datetime_201903, datetime_202003, datetime_202103]
    _2021_3thr.intervals = [datetime_201803, datetime_201903, datetime_202003]

    _2025_3thr.zzqz_date = '20250731'
    _2024_3thr.zzqz_date = '20240731'
    _2023_3thr.zzqz_date = '20230731'
    _2022_3thr.zzqz_date = '20220729'
    _2021_3thr.zzqz_date = '20210730'

    _2025_3thr.str_930955_date = '20250731'
    _2024_3thr.str_930955_date = '20241031'
    _2023_3thr.str_930955_date = '20231031'
    _2022_3thr.str_930955_date = '20221031'
    _2021_3thr.str_930955_date = '20211029'

    _2025_3thr.str_filePre = 'zfile/a20250808_2/a20250808_930955_3thr_2025'
    _2024_3thr.str_filePre = 'zfile/a20250808_2/a20250808_930955_3thr_2024'
    _2023_3thr.str_filePre = 'zfile/a20250808_2/a20250808_930955_3thr_2023'
    _2022_3thr.str_filePre = 'zfile/a20250808_2/a20250808_930955_3thr_2022'
    _2021_3thr.str_filePre = 'zfile/a20250808_2/a20250808_930955_3thr_2021'

    calc(_2025_3thr)
    calc(_2024_3thr)
    calc(_2023_3thr)
    # calc(_2022_3thr)
    # calc(_2021_3thr)

    pass
